package com.oocl.processdData.service;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;
import java.util.Set;

import com.oocl.processdData.pojo.Customer;

public interface CustomerService {
	
	/**
	 * 生成可打印的xml信息
	 * @param customrs
	 * @return
	 */
	public String customersXML(Set<Customer> customrs);

	/**
	 * 将records 转换为 customrs
	 * @param records
	 * @return
	 */
	public ArrayList<Customer> parseToCustomers(ArrayList<String> records);
	
	/**
	 * 根据 cmpa 规则，对 orgCusts的数据进行排序
	 * @param orgCusts
	 * @param cmpa
	 * @return
	 */
	public Set<Customer> sort(Set<Customer> orgCusts, Comparator<Customer> cmpa);
	
	/**
	 * 获取用户输入信息
	 * @return
	 * @throws IOException 
	 */
	public String getInputMsg(InputStream in) throws IOException;
	
	/**
	 * 处理不同类型的cmd
	 * @param cmdType
	 * @throws IOException 
	 */
	public void processCmd(String cmdType, Set<Customer> checkedCusts, OutputStream out) throws IOException;
}
